package com.zyw.mapper.user;

import com.zyw.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Set;

public interface UserMapper {

    @Select("select * from user where username=#{username}")
    User findByUsername(@Param("username") String username);


    @Select("select role_name from user_role_view where username=#{username}")
    Set<String> findRolesByUsernaem(@Param("username") String username);


    //根据角色信息查询权限信息
    Set<String> findPermissionsByRoles(HashMap<String, Object> map);

    @Select("select * from filter_chain order by ordered asc")
    LinkedHashMap<String, String> findShiroFilterChain();

}
